<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>我的用户中心</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/theme/css/main.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/theme/css/style_userCenter.css">

<script type="text/javascript"
	src="${pageContext.request.contextPath}/theme/js/jquery-1.6.js"></script>

<script type="text/javascript">
	function deleteNotice(id) {
		$
				.ajax({
					type : "post",
					url : "${pageContext.request.contextPath}/notification/deleteNotice.action", // 发送请求地址
					data : { // 发送给数据库的数据
						ajax : "true",
						id : id
					},
					//dataType : "json", // 接收的数据格式为JSON，如果不指定则自动检测，如果没有返回数据则不指定，否则出错
					success : function() {
						window.location.reload();
					}
				});
	}
</script>

</head>
<body>
	<div>
		<jsp:include page="nav.jsp">
			<jsp:param value="nav_message" name="nav" />
		</jsp:include>
	</div>
	<div class="realCer">

		<!--主体部分-->
		<div class="realMain clearfix mt10">
			<!--左侧菜单-->
			<div class="realLeft" id="meunLeft">
				<jsp:include page="leftMenu.jsp">
					<jsp:param value="con_nav_message" name="con_nav" />
				</jsp:include>
			</div>
			<!--中由-->
			<div class="realRight ml10">
				<!--中间-->
				<div class="realR_left">

					<div class="box">
						<div class="tit">我的通知列表</div>
						<div class="con" style="width:558px;">

							<table>
								<s:iterator value="noticeList" id="item" status="st">
									<tr id="${item.id}">
										<td width="16" height="60" style="text-align:center"><s:if
												test="#item.status==1">
												<img src="../theme/images/userAdmin/msg_unread.png"
													width="16" height="14">
											</s:if> <s:else>
												<img src="../theme/images/userAdmin/msg_read.png" width="16"
													height="14">
											</s:else>
										</td>
										<td width="60" height="60" style="text-align:center"><img
											src="../theme/images/admin/administrator.png" width="50"
											height="50"></td>
										<td width="180" height="60" style="text-align:center"><s:date
												name="#item.addTime" format="yyyy-MM-dd hh:mm:ss" />
										</td>
										<td width="300" height="60" style="text-align:left"><s:if
												test="#item.type==1">
												<a href="#">来自<s:property value="#item.sender" />的应标邀请，请点击查看。</a>
											</s:if> <s:elseif test="#item.type==2">
												<!-- 其他类型的消息 -->
											</s:elseif>
										</td>
										<td width="10" height="60" style="text-align:center"><a
											href="#" onclick="deleteNotice(${item.id})" /><img
											src="../theme/images/userAdmin/delete.png" width="10"
											height="10"> </a>
										</td>
										<!-- ${pageContext.request.contextPath}/notification/deleteNotice.action?id=${item.id} -->
									</tr>
								</s:iterator>
							</table>
						</div>
					</div>

				</div>
				<!-- 中间 -->
				<!--右侧-->
				<jsp:include page="../noticeTemplate.jsp"></jsp:include>
				<!--右侧-->
			</div>
			<!--中由-->
		</div>
	</div>
	<div>
		<jsp:include page="../footer.jsp"></jsp:include>
	</div>
</body>
</html>
